//全局的一些引用可以放这儿，不必全放main.js中，哪怕最后还是在main.js中执行
import Vue from 'vue';
import './../router/g.beforeEach';
import api from './../api';
import storage from './../utils/storage';
import axios from './http';
import { addEvent, removeEvent, hasEvent } from '../commons/func';
import VueAwesomeSwiper from 'vue-awesome-swiper';
import 'swiper/dist/css/swiper.css'
Vue.use(VueAwesomeSwiper, /* { default global options } */);
//addEventListener
Object.defineProperty(Vue.prototype, 'addEvent', {
    value: addEvent
});
//removeEventListener
Object.defineProperty(Vue.prototype, 'removeEvent', {
    value: removeEvent
});
Object.defineProperty(Vue.prototype, 'hasEvent', {
    value: hasEvent
});

//API全局注册
Object.defineProperty(Vue.prototype, '$api', {
    value: api
});

//storage全局封装
Object.defineProperty(Vue.prototype, '$storage', {
    value: storage
});

//http请求
Object.defineProperty(Vue.prototype, '$axios', {
    value: axios
});